package com.zq.assistant.utils;

import android.content.Context;

/**
 * Created by zhangqiang on 17-6-29.
 */

public class SharedPreferenceUtils {

    private static final String FILE_CONFIG = "config";

    public static boolean saveString(Context context, String key, String value) {

        return context.getSharedPreferences(FILE_CONFIG, Context.MODE_PRIVATE).edit().putString(key, value).commit();
    }

    public static String getString(Context context, String key,String defaultValue) {

        return context.getSharedPreferences(FILE_CONFIG, Context.MODE_PRIVATE).getString(key,defaultValue);
    }
}
